package com.springframework.autowire_t.controller;

import com.springframework.autowire_t.service.UserService;

public class UserController {
    private UserService userService;

//    使用setter方法进行依赖注入
    public void setUserService(UserService userService) {
        this.userService = userService;
    }
    public void userController(){
        System.out.println("controller层调用的方法...");
        userService.addUserService();
    }
}
